package com.yeqian.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.yeqian.utils.EnumUtils;

/**
 * @author
 *
 */
public enum StatusEnum implements BaseEnum {
    WAIT(10, "待审核"),
    SUBMIT(20, "审核通过"),
    AUDIT(30,"审核失败");

    private Integer code;
    private String text;

    StatusEnum(Integer code, String text) {
        this.code = code;
        this.text = text;
    }

    @JsonCreator
    public static StatusEnum jsonCreate(Integer code) {
        return EnumUtils.codeOf(StatusEnum.class, code);
    }

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getText() {
        return this.text;
    }

    @JsonValue
    public Integer getCodeStr() {
        return this.code;
    }

}
